package com.example.gc.webredisgc.service;

import com.allqj.qjf.multi.datasource.utils.TenantContextHolder;
import com.example.gc.webredisgc.dao.MisSaas;
import com.example.gc.webredisgc.dao.MisSaasDao;
import com.example.gc.webredisgc.dao.MisSaasES;
import com.example.gc.webredisgc.dao.MisSaasEsDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Optional;

/**
 * @author sjw
 * @className HomeService
 * @date 2021/9/22 17:16
 * @description: TODO
 */
@Service
public class HomeService1 {



    @Async
    public void async() throws InterruptedException {
        Thread.sleep(1000);
        System.out.println("HomeService1 async: "+ TenantContextHolder.getTenantContext());
    }
}
